<h3 class="info-tag media-cate">
    <a class="uiBtn r" href="#!wxreply/smartreply" style="font-size:12px">返回</a>
    <a class="tab-btn" href="#!wxreply/subscribe">被关注自动回复<b class="z1">◆</b><b class="z0">◆</b></a>
    <a class="tab-btn" href="#!wxreply/autoreply">消息自动回复<b class="z1">◆</b><b class="z0">◆</b></a>
    <a class="tab-btn on" href="#!wxreply/smartreply">关键词自动回复<b class="z1">◆</b><b class="z0">◆</b></a>
    <span></span>
</h3>

{literal}
<style type="text/css">
.reply_list{border:1px solid #ddd; border-bottom:none; border-top:none}
.reply_list li{border-bottom:1px solid #ddd; padding:5px; position:relative}
.wxreply-opera{position:absolute; right:5px; top:5px}
.reply_html{line-height:24px}
</style>
{/literal}
<div class="html-box">

    <form class="newsBox" id="smartreplyForm" method="post" style="width:550px; padding:5px 5px 80px">

        <input name="id" value="{$rule.id}" type="hidden">

        <div class="f-unit">
            <label class="ui-label w60">规则名：</label>
            <input class="form-i w200" name="rule_name" value="{$rule.name}" type="text">
        </div>

        <div class="f-unit">
            <label class="ui-label w60">关键字： </label>
            <div class="l" style="width: 465px;">
                <table class="list" style="width:100%" id="kwlist">
                    <tbody>
                    <tr><th>关键字</th><th>完全匹配</th><th>操作</th></tr>

                    {foreach from=$rule.keywords item=m key=k}
                    <tr>
                        <td><input type="text" class="form-i LH22 w200" name="kw[{$k}]" value="{$m.keyword}"></td>
                        <td><input type="checkbox" value="1" name="match[{$k}]"{if $m.match} checked{/if}></td>
                        <td><a href="javascript:;" class="uiBtn BtnOrange e2-wxreply-delKw"><i class="iconfont">&#xe60b;</i></a> </td>
                    </tr>
                    {foreachelse}
                    <tr>
                        <td><input type="text" class="form-i LH22 w200" name="kw[0]" value=""></td>
                        <td><input type="checkbox" value="1" name="match[0]"></td>
                        <td><a href="javascript:;" class="uiBtn BtnOrange e2-wxreply-delKw"><i class="iconfont">&#xe606;</i></a> </td>
                    </tr>
                    {/foreach}

                    </tbody>
                </table>
                <div style="padding-top:5px">
                    <a class="uiBtn BtnBlue e2-wxreply-addKw" href="javascript:;">添加关键字</a>
                </div>
            </div>
        </div>

        <div class="f-unit">
            <label class="ui-label w60">回复： </label>
            <div class="l" style="width: 465px;">
                <div class="wxmsg-types clear" id="wxmsg-tabs">
                    <a href="javascript:;" rel="text" class="type-btn tab_text e2-wxmenu-editMsg-text">
                        <i class="iconfont">&#xe603;</i><span>文本</span>
                    </a>
                    <a href="javascript:;" rel="image" class="type-btn tab_img e2-wxmenu-editMsg-image" style="display: none">
                        <i class="iconfont">&#xe611;</i><span>图片</span>
                    </a>
                    <a href="javascript:;" rel="news" class="type-btn tab_news e2-wxmenu-editMsg-news">
                        <i class="iconfont">&#xe602;</i><span>图文</span>
                    </a>
                </div>

                <div>
                    <ul id="reply_list" class="reply_list"></ul>
                </div>

            </div>
        </div>


        <div class="f-unit">
            <label class="ui-label w60">&nbsp;</label>
            <a type="submit" class="uiBtn BtnGreen BtnLg e2-wxmenu-submitRule">提&nbsp;&nbsp;交</a>
        </div>
    </form>


    <div style="height:80px"></div>
</div>
<script type="text/javascript">
    $.loadJs('/admin/js/manage/wxreply.js',function(){
    $.loadJs('/admin/js/manage/wxmenu.js',function(){
        wxreply.initEditReply({$ruleJson});
    });
    });
</script>